package edu.gatech.cs2340.bytebankers.view;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.Point;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.Border;

import org.omg.CORBA.PRIVATE_MEMBER;

public class testView {
	
	public static void main(String[] args){
		
		JFrame myFrame = new JFrame("Test Store View");
		myFrame.setPreferredSize(new Dimension(800, 500));
		JPanel mPanel = new JPanel();
		mPanel.setLocation(new Point(25, 100));
		mPanel.setPreferredSize(new Dimension(300, 150));
		mPanel.setLayout(new GridLayout(18,1));
		myFrame.add(mPanel);
		
		for (int i = 0; i < 3; i++) {
			JPanel panel = new JPanel();
			JPanel txtPanel = new JPanel();
			JTextField qty = new JTextField(2);
			txtPanel.add(qty);
			JLabel lblName = new JLabel("Name");
			JLabel lblPrice = new JLabel("$50");
			JLabel lblWeight = new JLabel("10 lbs");
			JLabel lblInventory= new JLabel("3");
			panel.setLayout(new GridLayout(1, 9));
			panel.add(txtPanel);
			panel.add(lblName);
			panel.add(lblPrice);
			panel.add(lblWeight);
			panel.add(lblInventory);
			for (int j = 0; j < 4; j++) {
				panel.add(new JLabel());
			}
			mPanel.add(panel);
		}
		
		myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		myFrame.pack(); //Adjusts panel to components for display
		myFrame.setVisible(true);				
	}

}
